﻿@model TaxTypeSelectorModel
@using Nop.Core;
@using Nop.Core.Domain.Tax;
@using Nop.Core.Infrastructure;
@using Nop.Web.Models.Common;
@{
    var webHelper = EngineContext.Current.Resolve<IWebHelper>();

    var taxTypes = new List<SelectListItem>();
    taxTypes.Add(new SelectListItem()
    {
        Text = T("Tax.Inclusive").Text,
        Value = webHelper.ModifyQueryString(Url.RouteUrl("ChangeTaxType", new { customertaxtype = ((int)TaxDisplayType.IncludingTax) }), "returnurl=" + HttpUtility.UrlEncode(HttpContext.Current.Request.RawUrl), null),
        Selected = Model.CurrentTaxType == TaxDisplayType.IncludingTax
    });
    taxTypes.Add(new SelectListItem()
    {
        Text = T("Tax.Exclusive").Text,
        Value = webHelper.ModifyQueryString(Url.RouteUrl("ChangeTaxType", new { customertaxtype = ((int)TaxDisplayType.ExcludingTax) }), "returnurl=" + HttpUtility.UrlEncode(HttpContext.Current.Request.RawUrl), null),
        Selected = Model.CurrentTaxType == TaxDisplayType.ExcludingTax
    });
}
@Html.DropDownList("customerTaxType", taxTypes, new { onchange = "setLocation(this.value);" })
